package com.nancy.java_design.strategy.demo1;

/**
 * 策略模式
 * 环境角色 ： 持有一个策略类的引用
 */
public class Saleman {
    private Promotion promotion;

    public Saleman(Promotion promotion) {
        this.promotion = promotion;
    }

    public void sale() {
        promotion.execute();
    }
}
